package com.housekeeping.housekeeping.advertisingmanagement.dao;/*
 * @author  pyh
 * @date  2021/1/18 0018 下午 8:06
 * @version 1.0
 * @since JDK1.8_241
 */

import com.housekeeping.housekeeping.advertisingmanagement.entity.AdMessages;

import java.sql.SQLException;
import java.util.List;

public interface OperationDao {
/*    //用来查询
    Object run() throws SQLException;
    //用来增删改
    int run(AdMessages adMessages) throws SQLException;*/

    int insert(AdMessages adMessages);//添加
    AdMessages update(int id);//修改
    int delete(int id);//删除

    List<AdMessages> selectAll();//总查询
    List<AdMessages> selectByKey(String name) throws SQLException;//模糊查询

    int selectCount(AdMessages adMessages) throws SQLException;//查总条数
    //分页查询
    List<AdMessages> selectByPage(int limit, int size) throws SQLException;

    int selectCount() throws SQLException;//根据老师之前的方法写的
}
